package com.example.comsumer.common;

import java.io.Serializable;
import java.util.Arrays;

/**
 * @ClassName RpcRequest
 * @Description TODO
 * @Author 11
 * @Date 2021/3/31 19:55
 * @Version 1.0
 */
public class RpcRequest implements Serializable {
    private static final long serialVersionUID = 42L;

    private String requestId;  //请求的id
    private String className;  //类名
    private String methodName;  //方法名
    private Class<?>[] parameterTypes;  //参数类型列表
    private Object[] parameters;  //参数列表

//    private String version;  //版本
//    private long createMillisTime;
//    private String accessToken;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

//    public long getCreateMillisTime() {
//        return createMillisTime;
//    }
//
//    public void setCreateMillisTime(long createMillisTime) {
//        this.createMillisTime = createMillisTime;
//    }
//
//    public String getAccessToken() {
//        return accessToken;
//    }
//
//    public void setAccessToken(String accessToken) {
//        this.accessToken = accessToken;
//    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class<?>[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }

    public Object[] getParameters() {
        return parameters;
    }

    public void setParameters(Object[] parameters) {
        this.parameters = parameters;
    }

    @Override
    public String toString() {
        return "RpcRequest{" +
                "requestId='" + requestId + '\'' +
                ", className='" + className + '\'' +
                ", methodName='" + methodName + '\'' +
                ", parameterTypes=" + Arrays.toString(parameterTypes) +
                ", parameters=" + Arrays.toString(parameters) +
                '}';
    }

}
